//
//  UIFont+MGAdd.m
//  MGKit
//
//  Created by 赖锋海 on 2018/7/23.
//

#import "UIFont+MGAdd.h"
#import "YYCGUtilities.h"

@implementation UIFont (MGAdd)

+ (UIFont *)semiboldPingFangFontOfSize:(CGFloat)size {
    return [UIFont fontWithName:@"PingFangSC-Semibold" size:[UIFont fontForAdaptScreen:size]];
}

+ (UIFont *)mediumPingFangFontOfSize:(CGFloat)size {
    return [UIFont fontWithName:@"PingFangSC-Medium" size:[UIFont fontForAdaptScreen:size]];
}

+ (UIFont *)regularPingFangFontOfSize:(CGFloat)size {
    return [UIFont fontWithName:@"PingFangSC-Regular" size:[UIFont fontForAdaptScreen:size]];
}

+ (UIFont *)bebasFontOfSize:(CGFloat)size {
    return [UIFont fontWithName:@"Bebas" size:[UIFont fontForAdaptScreen:size]];
}

+ (CGFloat)fontForAdaptScreen:(CGFloat)size {
    if ([UIDevice isPad]) {
        return size*1.14;
    }
    CGFloat currentWidth = YYScreenSize().width;//[UIScreen mainScreen].bounds.size.width;
    if (currentWidth > 375) {
        return (currentWidth/375.0)*size*0.95;
    }
    return size;
}


@end        
